package com.github.aloxc.plugin.restplus.navigator;


import com.github.aloxc.plugin.restplus.navigation.action.RestServiceItem;

import java.util.List;
import java.util.Objects;
/**
 *
 * @author leero
 */
public class RestServiceProject {
    private String name;
    private List<RestServiceItem> serviceItems;
    private boolean swagger;
    public RestServiceProject(String name, List<RestServiceItem> serviceItems) {
        this.name = name;
        this.serviceItems = serviceItems;
    }

    public RestServiceProject() {
    }

    public boolean isSwagger() {
        return swagger;
    }

    public void setSwagger(boolean swagger) {
        this.swagger = swagger;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<RestServiceItem> getServiceItems() {
        return serviceItems;
    }

    public void setServiceItems(List<RestServiceItem> serviceItems) {
        this.serviceItems = serviceItems;
    }

    @Override
    public String toString() {
        return name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RestServiceProject that = (RestServiceProject) o;
        return name.equals(that.name) &&
                serviceItems.equals(that.serviceItems);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, serviceItems);
    }
}
